#include<bits/stdc++.h>
using namespace std;
int main() {
	int n;
	cin >> n;
	while (cin >> n) {
		string s = to_string(n);
		for (auto ii : s) {
			cout << ii << " ";
		}
	}
	return 0;
}
